<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>立方体设计</title>
    <style>
        .box {
            width: 200px;
            height: 200px;
            position: relative;
            perspective: 1000px;
            /* 透视 */
            transform-style: preserve-3d;
            /* 定义子元素保持3D位置 */
            transform: translate(150px, 100px) rotateX(-30deg) rotateY(30deg);
        }
        
        .box div {
            /* background-color: #ccc; */
            font-size: 30px;
            text-align: center;
            width: 200px;
            height: 200px;
            border: 1px solid #fff;
            box-sizing: border-box;
            line-height: 200px;
            position: absolute;
            opacity: 0.5;
        }
        
        .box:hover {
            width: 1000px;
            height: 1000px;
            transform: rotateX(-360deg) rotateY(-360deg) rotateZ(-360deg);
            transition: 5s;
        }
        
        .font {
            transform: translateZ(100px);
            background-color: red;
        }
        
        .back {
            transform: translateZ(-100px);
            background-color: yellow;
        }
        
        .left {
            transform: rotateY(-90deg) translateZ(100px);
            background-color: blue;
        }
        
        .right {
            transform: rotateY(90deg) translateZ(100px);
            background-color: green;
        }
        
        .top {
            transform: rotateX(90deg) translateZ(100px);
            background-color: #FFA500;
        }
        
        .bottom {
            transform: rotateX(90deg) translateZ(-100px);
            background-color: #00FFFF;
        }
        
        .peach {
            transform: translateX(50px) translateY(50px) translateZ(50px);
        }
    </style>
</head>

<body>
    <div class="box">
        <div class="font">1 前</div>
        <div class="back">2 后</div>
        <div class="left">3 左</div>
        <div class="right">4 右</div>
        <div class="top">5 上</div>
        <div class="bottom">6 下</div>
        <img src="摇晃的桃子/图片/peach11.png" class="peach">
    </div>
</body>

</html>